// index.js
Page({
  addLog(event){
    //console.log("event:",event)
    const add = event.detail.value
    //console.log("add:",add)
    const ui = wx.getStorageSync('userInfo')
    if(!ui.openid){
      wx.switchTab({
        url:'/pages/me/me'
      })
    }else{
      wx.cloud.callFunction({
        name:"createlog",
        data:{
          add:add,
          date:Date.now(),
          openid:ui.openid
        }
      })
    }
  }
})
